package me.huha.commons.email;

import java.io.Serializable;

import org.apache.commons.lang3.StringUtils;

/**
 * @Title: UserEmailDTO.java
 * @Author: Yepx
 * @mail: yepx2013@gmail.com
 * @CreateTime: 2017年6月14日 下午1:44:57
 * @Todo: 邮箱帐号
 */
public class UserEmailDTO implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7658496308021319587L;
	
	/** 邮箱帐号 */
	private String email;
	/** 密码 */
	private String passWord;
	/** 发件昵称 */
	private String nickName;
	/** 邮箱类型 **/
	private String providerCode;
	/** 签名 */
	private String signature;
	/** 发送协议 */
	private EmailSetDTO sendProtocol;
	/** 接收协议 */
	private EmailSetDTO getProtocol;
	/** 接收新消息通知 */
	private Boolean newMsgNoticeAble;
	/** 通知显示消息详情 */
	private Boolean msgDetailsAble;
	
	public UserEmailDTO(String email, String passWord, String nickName) {
		super();
		this.email = email;
		this.passWord = passWord;
		if(StringUtils.isBlank(nickName)){
			nickName = email.split("@")[0];
		}
		this.nickName = nickName;
	}
	
	public UserEmailDTO() {
		super();
	}
	
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getPassWord() {
		return passWord;
	}
	public void setPassWord(String passWord) {
		this.passWord = passWord;
	}
	public String getNickName() {
		return nickName;
	}
	public void setNickName(String nickName) {
		this.nickName = nickName;
	}
	public String getProviderCode() {
		return providerCode;
	}
	public void setProviderCode(String providerCode) {
		this.providerCode = providerCode;
	}
	public String getSignature() {
		return signature;
	}
	public void setSignature(String signature) {
		this.signature = signature;
	}
	public EmailSetDTO getSendProtocol() {
		return sendProtocol;
	}
	public void setSendProtocol(EmailSetDTO sendProtocol) {
		this.sendProtocol = sendProtocol;
	}
	public EmailSetDTO getGetProtocol() {
		return getProtocol;
	}
	public void setGetProtocol(EmailSetDTO getProtocol) {
		this.getProtocol = getProtocol;
	}
	public Boolean getNewMsgNoticeAble() {
		return newMsgNoticeAble;
	}
	public void setNewMsgNoticeAble(Boolean newMsgNoticeAble) {
		this.newMsgNoticeAble = newMsgNoticeAble;
	}
	public Boolean getMsgDetailsAble() {
		return msgDetailsAble;
	}
	public void setMsgDetailsAble(Boolean msgDetailsAble) {
		this.msgDetailsAble = msgDetailsAble;
	}
}
